OrderedSet Constructor (IEnumerable)

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Creates a new OrderedSet. The T must implement IComparable<T> or IComparable. The CompareTo method of this interface will be used to compare items in this set. The set is initialized with all the items in the given collection.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public OrderedSet(
	IEnumerable<T> collection
)
Visual Basic (Declaration)
Public Sub New ( _
	collection As IEnumerable(Of T) _
)
Visual C++
public:
OrderedSet (
	IEnumerable<T>^ collection
)

Parameters

collection
IEnumerable<(Of <T>)>
A collection with items to be placed into the OrderedSet.

Remarks

Items that are null are permitted, and will be sorted before all other items.

Exceptions

ExceptionCondition
System..::InvalidOperationExceptionT does not implement IComparable<TKey>.

See Also